package com.lbn.jfqsc.app.recruitment.adapter;

import android.content.Context;

import com.lbn.baseframe.base.BaseRecyclerAdapter;
import com.lbn.baseframe.base.RecyclerViewHolder;
import com.lbn.baseframe.utils.DateUtils;
import com.lbn.jfqsc.R;
import com.lbn.jfqsc.business.bean.JobList;

import java.util.List;

/**
 * Created by 李炳南
 * 2017/2/28.
 */

public class RecruitmentAdapter extends BaseRecyclerAdapter<JobList> {

    public RecruitmentAdapter(Context ctx, List<JobList> list) {
        super(ctx, list);
    }

    @Override
    public int getItemLayoutId(int viewType) {
        return R.layout.layout_item_recruitment;
    }

    @Override
    public void bindData(RecyclerViewHolder holder, int position, JobList item) {

        holder.setText(R.id.recruitment_title_tv, item.getTitle())
                .setText(R.id.recruitment_company_tv, item.getCompany())
                .setText(R.id.recruitment_time_tv, DateUtils.stampToDate(item.getCreateTime()));

    }
}
